Analysis Notebook for JPM Experiments


In [1]:
from matplotlib.pyplot import *
import matplotlib
from numpy import linspace, sin, exp
from scipy.constants import h
from scipy.optimize import curve_fit

%matplotlib inline
matplotlib.rcParams['savefig.dpi'] = 144

Matplotlib Settings


In [2]:
matplotlib.rcParams['savefig.dpi'] = 144
matplotlib.rcParams['savefig.transparent'] = True
matplotlib.rcParams['axes.facecolor'] = '#444444'
matplotlib.rcParams['axes.edgecolor'] = 'w'
matplotlib.rc('xtick',color='w')
matplotlib.rc('ytick', color='w')

Photon Number $$N = \frac{\text{RF Power}}{\hbar\omega}$$


In [3]:
def N(power, length, freq):
    """Power in db, pulse length in ns, freq in GHz
    """
    p = (10.**(power/10.))/1e3 # Convert to Watts
    print("Power: " + str(p) + "Watts")
    
    en = p*(length/1.e9) # Energy in given pulse length
    print("Energy: " + str(en) + "Joules")
    
    n = en/(h*freq*1.e9) # Divide by hf in GHz
    print("Photons:" + str(int(n)))
    
    return n

In [4]:
def P_switch(P_dark, P_bright, power, length, freq):
    n = N(power, length, freq)
    
    p = exp(-n)*P_dark + (1-exp(-n))*P_bright
    print("Switching Probability:" + str(p) + "%")
    return p

In [5]:
result=P_switch(10, 50, -120., 5, 5)


Power: 1e-15Watts
Energy: 5e-24Joules
Photons:1
Switching Probability:41.1564432557%

Contrast $$C = P_{s,\text{No RF}} - P_{s, \text{RF}}$$


In [6]:
def contrast(P_dark, P_bright, power, length, freq):
    n = N(power, length, freq)
    
    c = (exp(-n)-1)*P_dark + (1-exp(-n))*P_bright
    print("Contrast: " + str(c) + "%")

In [7]:
result = contrast(10, 90, -110, 5, 5)


Power: 1e-14Watts
Energy: 5e-23Joules
Photons:15
Contrast: 79.9999776766%

Quantum Efficiency $$\eta = \frac{P_{s,\text{RF}} - \mathrm{e}^{-N}P_{s,\text{No RF}} }{(1-\mathrm{e}^{-N})^2}$$


In [8]:
def qe(P_dark, P_bright, power, length, freq):
    n = N(power, length, freq)
    eta = (P_switch(P_dark, P_bright, power, length, freq) - exp(-n)*P_dark)/(1-exp(-n))**2
    print ("Quantum Efficiency:" + str(eta) + "%")
    return eta

In [9]:
result = qe(10., 50., -110., 5., 5.)


Power: 1e-14Watts
Energy: 5e-23Joules
Photons:15
Power: 1e-14Watts
Energy: 5e-23Joules
Photons:15
Switching Probability:49.9999888383%
Quantum Efficiency:50.0000139521%

In [66]:



---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-66-655d1abbe3e9> in <module>()
----> 1 eta

NameError: name 'eta' is not defined

In [ ]: